/**
*      author: Y_Yao
*      created: 2025-03-01 20:02:05
**/

#include<bits/stdc++.h>

#define int LL
using namespace std;
using LL = long long;
const LL LLINF = 1e18;
const int INF = 0x3f3f3f3f;
const int N = 50 + 7;
int n;
char a[N][N];

void solve()
{
    cin >> n;
    for(int i = 1;i <= n;i++)
    {
        for(int j = i;j <= n - i + 1;j++)
        {
            if(i % 2 == 1)//奇数
            {
                a[i][j] = '#';
            }
            else
            {
                a[i][j] = '.';
            }
        }
    }
    for(int i = 1;i <= n;i++)
    {
        for(int j = 1;j <= i;j++)
        {
            a[i][j] = a[j][i];
        }
    }

    for(int i = 1;i <= n;i++)
    {
        for(int j = 1;j <= i-1;j++)
        {
            a[i][n-j+1] = a[i][j];
        }
    }
    for(int j = 1;j <= n;j++)
    {
        for(int i = 1;i <= j-1;i++)
        {
            a[n-i+1][j] = a[i][j];
        }
    }

    for(int i = 1;i <= n;i++)
    {
        for(int j = 1;j <= n;j++)
        {
            cout << a[i][j];
        }
        cout << endl;
    }
}

signed main()
{
    ios::sync_with_stdio(false);
    cin.tie(0);

    int t = 1;
    //cin >> t;
    while(t--)
    {
        solve();
    }
    return 0;
}